package com.cody.dao;

import com.cody.entity.Comment;
import com.cody.entity.Question;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Cody
 * @date 2021/4/9 - 21:07
 */
public interface CommentDao {
    List<Comment> queryAllComment();

    List<Comment> queryAllCommentByQuestionId(@Param("questionId") Integer questionId);
    boolean delCommentByCommentId(@Param("commentId") Integer commentId);
    List<Comment> queryAllCommentByNumber(@Param("number") String number);
    Comment queryCommentByCommentId(@Param("CommentId") Integer commentId);
    List<Comment> queryCommentByKeyword(@Param("keyword") String keyword);

    boolean insertComment(@Param("comment") Comment comment);
    boolean updCommentInfo(@Param("comment") Comment comment);
}
